﻿using H.Nets;

namespace H.Net.Nets
{
    /// <summary>
    /// Net包简单工厂
    /// </summary>
    public class HNetFactory : INetFactory
    {
        ///<inheritdoc/>
        public ITcpClient CreateTcpClientInstance(string hostName, int port)
        {
            return new HTcpClient(hostName, port);
        }

        ///<inheritdoc/>
        public ITcpServer CreateTcpServerInstance(int port)
        {
            return new HTcpServer(port);
        }
    }
}
